package com.zatech.cgnci.project.base.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

/**
 * 业务场景枚举
 */
@Getter
@AllArgsConstructor
public enum BusinessScenariosEnum {
    INSURANCE("insurance","险种"),
    POLICY("policy","承保"),
    CLAIM("claim","理赔"),
    RESERVE("reserve","准备金"),
    REINSURANCECOMPANY("reInsuranceCompany","再保公司"),
    FINANCE("finance","财务");
    public static BusinessScenariosEnum getEnumByCode(String code) {
        return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findAny().orElse(null);
    }
    private String code;
    private String descr;
    
    
    
    
    
}
